﻿using chudb.Engine;
using System;

namespace chudb
{
    public class ChudbFile : ChuEngine, IDisposable
    {
        internal static int initial_size = 163840;
        public ChudbFile(string path, bool _readonly = false) : base(new EngineSettings { Filename = path, InitialSize = initial_size, ReadOnly = _readonly })
        {
        }
        
        public ChuSpace TakeSpace(string ns)
        {
            return new ChuSpace(this, ns);
        }
        public bool DeleteSpace(string ns)
        {
            return this.DropCollection(ns);
        }
        public void Dispose()
        {
            base.Dispose();
        }
    }
}
